Bug 554696 – invalid free function used
authorChristian Persch <chpe@src.gnome.org>
Thu, 2 Oct 2008 19:47:45 +0000 (19:47 +0000)
committerChristian Persch <chpe@src.gnome.org>
Thu, 2 Oct 2008 19:47:45 +0000 (19:47 +0000)
svn path=/trunk/; revision=21569

ChangeLog
gtk/gtkfilesystemmodel.c

index 6c5e891e017143ed1993cfb9a29456b184652853..3a75c83078cdd0d3ac7070bb842629b445d60fb3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-02  Christian Persch
+
+        Bug 554696 – invalid free function used
+
+        * gtk/gtkfilesystemmodel.c: Use the right free func.
+
 2008-10-02  Christian Persch
 
         Bug 554691 – mem leak in filechooser
index aab21109db2791ddd6a167cd84c3577a6290d865..de08a6374faecc7ab67d10d5974b62c6fb94e6fe 100644 (file)
@@ -1022,7 +1022,7 @@ ref_path_cb (GCancellable *cancellable,
       goto out;
     }
 
-  g_object_unref (info->files);
+  g_object_unref (info->files->data);
   info->files = g_slist_remove (info->files, info->files->data);
 
   if (g_slist_length (info->files) < 1)
@@ -1070,7 +1070,8 @@ ref_path_cb (GCancellable *cancellable,
 out:
   if (info->node)
     unref_node_and_parents (info->model, info->node);
-  g_object_unref (info->files);
+  g_slist_foreach (info->files, (GFunc)g_object_unref, NULL);
+  g_slist_free (info->files);
   g_slist_foreach (info->cleanups, (GFunc)g_object_unref, NULL);
   g_slist_free (info->cleanups);
   g_object_unref (info->model);